package com.example.mapper;

import com.example.entity.Student;
import com.example.entity.example.StudentExample;
import com.example.entity.bo.StudentCourseResultBO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentMapper {
    long countByExample(StudentExample example);

    int deleteByExample(StudentExample example);

    int deleteByPrimaryKey(String id);

    int insert(Student record);

    int insertSelective(Student record);

    List<Student> selectByExample(StudentExample example);

    Student selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByExample(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);

    List<Student> selectByExampleWithLimit(@Param("example") StudentExample example, @Param("begin") Integer begin, @Param("limit") Integer limit);

    long getCountByExample(StudentExample example);

    List<StudentCourseResultBO> getCourseResultsById(String id);

    StudentCourseResultBO getCourseResultsByIdAndCourseId(@Param("studentId") String studentId, @Param("courseId") String courseId);

    List<Student> selectByTeacherId(@Param("teacherId") String teacherId);
}